.teacherManagement {
  padding: 0;
}

/* 页面头部 */
.pageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pageHeader h2 {
  margin: 0;
  color: #1e293b;
  font-size: 1.75rem;
  font-weight: 700;
}

.headerActions {
  display: flex;
  gap: 1rem;
}

/* 按钮样式 */
.btnPrimary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btnPrimary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btnEdit {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnEdit:hover {
  background: #059669;
}

.btnDelete {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnDelete:hover {
  background: #dc2626;
}

.btnDetail {
  background: #6366f1;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnDetail:hover {
  background: #4f46e5;
}

/* 标签页样式 */
.tabs {
  display: flex;
  background: white;
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab {
  flex: 1;
  padding: 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tabActive {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tab:hover:not(.tabActive) {
  background: #f1f5f9;
}

/* 表格容器 */
.teachersTable,
.coursesTable {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.teachersTable table,
.coursesTable table {
  width: 100%;
  border-collapse: collapse;
}

.teachersTable th,
.teachersTable td,
.coursesTable th,
.coursesTable td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.teachersTable th,
.coursesTable th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
}

.teachersTable tr:hover,
.coursesTable tr:hover {
  background: #f9fafb;
}

/* 状态标签 */
.status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.statusActive {
  background: #d1fae5;
  color: #065f46;
}

.statusInactive {
  background: #fee2e2;
  color: #991b1b;
}

.courseStatus {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  min-width: 70px;
  text-align: center;
}

.courseStatusOngoing {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.courseStatusCompleted {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  color: #1e40af;
}

.courseStatusUpcoming {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
}

/* 课程统计 */
.coursesStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.statItem {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.statItem h3 {
  margin: 0 0 0.5rem 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
}

.statValue {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
}

/* 搜索框 */
.searchBox {
  margin-bottom: 1.5rem;
}

.searchBox input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.searchBox input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 操作按钮组 */
.actionButtons {
  display: flex;
  gap: 0.5rem;
}

/* 特殊单元格样式 */
.nameCell {
  font-weight: 600;
  color: #1e293b;
}

.emailCell {
  color: #64748b;
}

.codeCell {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: #3b82f6;
  background: #eff6ff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* 模态框样式 */
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modalHeader h3 {
  margin: 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.closeBtn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.closeBtn:hover {
  background: #f1f5f9;
  color: #374151;
}

/* 表单样式 */
.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 1.5rem;
}

.formGroup {
  display: flex;
  flex-direction: column;
}

.formGroup label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.formGroup input,
.formGroup select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.formGroup input:focus,
.formGroup select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

.modalActions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modalActions button[type="button"] {
  background: #f1f5f9;
  color: #64748b;
}

.modalActions button[type="button"]:hover {
  background: #e2e8f0;
}

/* 详情样式 */
.detailSection {
  margin-bottom: 1.5rem;
}

.detailGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.detailItem {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detailItem label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.875rem;
}

.detailItem span {
  color: #1e293b;
  font-size: 1rem;
}

/* 班级列表样式 */
.classesList {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.classCard {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.classCard:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.classCardHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.classCardActions {
  display: flex;
  gap: 0.5rem;
}

.btnViewClass {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnViewClass:hover {
  background: #2563eb;
}

.btnViewStudents {
  background: #10b981;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btnViewStudents:hover {
  background: #059669;
}

.classCardInfo {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.classInfoItem {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.classInfoLabel {
  color: #64748b;
  font-weight: 500;
}

/* 学生列表样式 */
.studentsList {
  width: 100%;
}

.studentsList table {
  width: 100%;
  border-collapse: collapse;
}

.studentsList th,
.studentsList td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.studentsList th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
}

.studentsList tbody tr:hover {
  background: #f9fafb;
}

.studentsList tbody tr:last-child td {
  border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .coursesStats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .teachersTable,
  .coursesTable {
    overflow-x: auto;
  }
  
  .formRow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }
  
  .coursesStats {
    grid-template-columns: 1fr;
  }
  
  .pageHeader {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .headerActions {
    flex-direction: column;
  }
  
  .headerActions .btnPrimary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .coursesStats {
    grid-template-columns: 1fr;
  }
  
  .teachersTable th,
  .teachersTable td,
  .coursesTable th,
  .coursesTable td {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .actionButtons {
    flex-direction: column;
  }
  
  .modal {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .formRow {
    padding: 0 1rem;
  }
  
  .modalHeader,
  .modalActions {
    padding: 1rem;
  }
}
.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
}

.formGroup {
  margin-bottom: 15px;
}

.formGroup label {
  display: block;
  margin-bottom: 5px;
}

.formGroup input,
.formGroup select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}